//
//  PublicUtil.h
//  Ikinloop-demo
//
//  Created by Li Shen on 2021/4/19.
//  Copyright © 2021 lyh. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface IKPublicUtil : NSObject

/**
 *  在Doucument 下面生成相应路径
 *
 *  @param dir <#dir description#>
 *
 *  @return <#return value description#>
 */
+(NSString*)documentsDir:(NSString*)dir;
//检查文件夹是否存在不存在就创建
+(BOOL)checkFileDir:(NSString*)fileDir;
// 存ecg data dir /Documents/ecgdata/
+(NSString*)currentECGDataFileDir;
// 把路径和文件名合成完整文件路径
+(NSString*)dir:(NSString*)dir file:(NSString*)file;
/**
 *  安全运行在主线程
 *
 *  @param run 主线程run回调
 */
+(void)runOnMainThread:(void(^)())run;
/**
 判断是否空字符
 */
+(BOOL) isEmpty:(NSString*) str;
+ (CGFloat) heightForString:(NSString *)value fontSize:(CGFloat)fontSize andWidth:(CGFloat)width;

+ (CGFloat) widthForString:(NSString *)value fontSize:(CGFloat)fontSize;

+(CGFloat) mm2pt:(CGFloat)mm;
+(CGFloat) pt2mm:(CGFloat)pt;

/**
 *  切换屏幕方向
 *
 *  @param orientation <#orientation description#>
 */
+(void)changeUIInterfaceOrientation:(UIInterfaceOrientation)orientation;
+(void)changeUIInterfaceOrientationPortrait;

+(UIImage*) createImageWithColor: (UIColor*) color;
@end

NS_ASSUME_NONNULL_END
